<?php
//no pc
echo "<script language=javascript>window.location.href='./mobileIndex.php'</script>";exit;

include("function.php");
include_once ("./class/ulevel_class.php");
header("Content-Type: text/html;charset=utf-8");
session_start();
unset($_SESSION['ID']);
unset($_SESSION['NickName']);
unset($_SESSION['UserID']);
unset($_SESSION['isboss']);
/*判断是不是手机登录*/
if(ismobile())
{
    echo "<script language=javascript>window.location.href='./mobileIndex.php'</script>";
}
// $ulevel = new ulevel_class();
// $iul = $ulevel->getulevelbyulevel (1);
// $nowdate=date('Y-m-d H:i:s',strtotime('+8 hour -'.$iul['yl29'].' hour'));//24小时

// $sql="DELETE member FROM member LEFT JOIN huikuan ON member.id = huikuan.uid  WHERE member.id<>1 and member.pdt <= '".$nowdate."' and huikuan.id  IS NULL ";
// $query = mysql_query($sql);

if ($_POST['loginnow'] == "loginnow"){
    if($_POST['txtValidCode'] == $_SESSION['code']){
        if(systemstatus()){
            if (checkLogin($_POST['txtUserAccount'],$_POST['txtPassword'])){

                $us=getMemberbyNickName($_POST['txtUserAccount']);
                if ($us['islock']==0){
                    $_SESSION['ID']=$us['id'];
                    $_SESSION['nickname']=$us['nickname'];
                    $_SESSION['username']=$us['username'];
                    $_SESSION['userid']=$us['userid'];
                    $_SESSION['isboss']=$us['isboss'];
                    //$_SESSION['sclogin']=$us['sclogin'];
                    $_SESSION['bdid']=$us['bdid'];
                    $_SESSION['isbd']=$us['isbd'];
                    $_SESSION['ispay']=$us['ispay'];
                    $_SESSION['ulevel']=$us['ulevel'];
                    $_SESSION['bdlevel']=$us['bdlevel'];
                    $_SESSION['ppath']=$us['ppath'];
                    $_SESSION['dzb']=$us['dianzibi'];
                    if ($us['id']==1){
                        $_SESSION['bdname']=$us['nickname'];
                    }else{
                        if ($us['isbd']==2){
                            $_SESSION['bdname']=$us['nickname'];
                        }else{
                            $_SESSION['bdname']=$us['bdname'];
                        }
                    }
                    $_SESSION['bclogin']=now();
                    //$member_update['sclogin']=now();
                    //edit_update_cl('member',$member_update,$us['id']);

                    echo "<script language=javascript>window.location.href='./member/main2.php'</script>";
                }else{
                    echo "<script language=javascript>alert('您已被管理员锁定,无法登陆,请联系管理员.');window.location.href='?'</script>";
                }

            }else{
                echo "<script language=javascript>alert('用户名或密码错误.');window.location.href='?'</script>";
            }
        }else{
            echo "<script language=javascript>alert('系统维护,暂时关闭,给您带来不便我们感到万分抱歉.');window.location.href='?'</script>";
        }
    }else{
        echo "<script language=javascript>alert('验证码错误.');window.location.href='?'</script>";
    }
}else{
    $_SESSION['ID']=null;
    $_SESSION['nickname']=null;
    $_SESSION['userid']=null;
    $_SESSION['isboss']=null;
    $_SESSION['pass2']=null;
    $_SESSION['pass3']=null;
    $_SESSION['bdname']=null;
    $_SESSION['bdid']=null;

}
?>
<!DOCTYPE HTML>

<META http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--[if gte IE 7]>
<meta name="msapplication-window" content="width=1024;height=768" />
<![endif]-->
<META http-equiv="X-UA-Compatible" content="requiresActiveX=true">
<TITLE></TITLE>

<SCRIPT src="js/jquery.min.js" type="text/javascript"></SCRIPT>
<LINK href="images/login2.css" rel="stylesheet" type="text/css">
<LINK href="js/jquery-ui.css" rel="stylesheet" type="text/css">

<script src="./unslider/jquery-1.11.1.min.js"></script>

<script src="./unslider/unslider.min.js"></script>
<style>

    html, body { font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;}

    ul, ol { padding: 0;}



    .banner { position: relative; overflow: auto; text-align: center;}

    .banner li { list-style: none; }

    .banner ul li { float: left; }

</style>
<script>

    $(document).ready(function(e) {

        $('#b02').unslider();

    });

</script>
<SCRIPT type="text/javascript">
    $(function(){
        var $username = $("#login_username");
        var $password = $("#login_password");
        var $message = $("#login_err_msg");
        var $buttons = $("#btn_login");
        $username.focus(function(){
            $(this).siblings("label").text("");
        }).blur(function(){
            if($username.val() == ""){
                $(this).siblings("label").text("账 号");
            }
        });
        $password.focus(function(){
            $(this).siblings("label").text("");
        }).blur(function(){
            if($password.val() == ""){
                $(this).siblings("label").text("登录密码");
            }
        });

        //登录按钮
        $buttons.click(function(){
            doSubmit();
        });

        //维护弹窗
        $( "#dialog" ).dialog({
            autoOpen: false,
            modal: true,
            width: 400,
            buttons: [
                {
                    text: "确定",
                    click: function() {
                        $( this ).dialog( "close" );
                    }
                }
            ]
        });

    });
    function doSubmit(){
        var name = $("#login_username").val();
        var pwd = $("#login_password").val();
        var valid = true;
        if(name == ""){
            valid = false;
            $("#login_err_msg").text("请填写账号!");
            $("#login_err_msg").show();
        }
        if(pwd == ""){
            valid = false;
            $("#login_err_msg").text("请填写登录密码!");
            $("#login_err_msg").show();
        }
        if(valid){
            $("#login_err_msg").text("");
            $("#login_err_msg").hide();
            $("#first_login").submit();
        }
    }
    function keyEvent(evt){
        evt = (evt) ? evt : ((window.event) ? window.event : "");
        var keyCode = evt.keyCode ? evt.keyCode : (evt.which ? evt.which : evt.charCode);
        if (keyCode == 13) {
            doSubmit();
        }
    }
</SCRIPT>

<SCRIPT>
    // 保持自己是最TOP的
    if (top.location != self.location)
        top.location=self.location;
</SCRIPT>

<SCRIPT language="javascript">
    function validate() {

        var oForm = document.loginForm;
        var numbersOnly = /^[0-9]+$/;
        if (oForm.txtUserAccount.value == "") {
            alert("Please enter the login account！！！");
            oForm.txtUserAccount.focus();
            oForm.txtUserAccount.select();
        }else if (oForm.txtPassword.value == "") {
            alert("Please enter the login password！！！");
            oForm.txtPassword.focus();
            oForm.txtPassword.select();
        }else if (oForm.txtValidCode.value == "") {
            alert("Please enter the verification code！！！");
            oForm.txtValidCode.focus();
            oForm.txtValidCode.select();
        }else {
            //oForm.btnSubmit.disabled = true;
            return true;
        }
        return false;
    }
    window.onload = function () {
        try {
            if(document.loginForm.txtUserAccount.value == '') {
                document.loginForm.txtUserAccount.focus();
            }else {
                document.loginForm.txtPassword.focus();
            }
        }catch(e) {}
    }//
    function getCode()
    {
        document.writeln("<img style=\"cursor:pointer;cursor:hand;\" title=\"看不清？点击更换图片。\" src=\"code.php"+"\"  onclick=\"chgSrc(this);\"/>");
    }
    function chgSrc(obj)
    {
        //obj.src="inc/getcode.asp?tmp="+Math.round(Math.random()*100000);
        obj.src="code.php";
    }
</SCRIPT>

<META name="GENERATOR" content="MSHTML 11.00.9600.17041"></HEAD>
<BODY style="margin: 0px; background-color: rgb(255, 255, 255);"><HEADER>

    <DIV class="mainnav">
        <DIV class="mainnav-wrap">
            <DIV class="logo">
                <H1>财付通 会支付 会生活</H1></DIV></DIV></DIV></HEADER><!-- 内容 [[ -->
<DIV class="container">
    <DIV class="login-layer"><!-- 登录框 [[ -->
        <DIV class="pop-login" id="pop_login">
            <DIV class="pop-login-wrap" id="login_wrap"><!-- 一次登录 [[ -->
                <FORM name="loginForm" onsubmit="return validate();" action="index.php" method="POST">
                    <INPUT type=hidden value=loginnow name=loginnow>
                    <FIELDSET>
                        <LEGEND><SPAN>会员登录</SPAN></LEGEND><!-- 报错提示 [[ -->
                        <DIV class="form-error hide" id="login_err_msg"></DIV><!-- 报错提示 ]] -->
                        <DIV class="form-line">
                            <LABEL class="label" for="login_uin">账 号：</LABEL>
                            <DIV class="element show-text-tips">
                                <LABEL class="text-tips" for="login_username">账  号</LABEL>
                                <INPUT name="txtUserAccount" tabindex="1" class="text ime-disabled" id="login_username" onfocus="if(this.value==' Please enter your user name')this.value='';" type="text">
                            </DIV>
                        </DIV>
                        <DIV class="form-line"><LABEL class="label">密 码：</LABEL>
                            <DIV class="element show-text-tips" id="pwd_wrap">
                                <LABEL class="text-tips" for="login_password">登录密码</LABEL>
                                <INPUT name="txtPassword" tabindex="2" class="text visible" id="login_password" onfocus="if(this.value==' Please enter your password')this.value='';" type="password">
                            </DIV>
                        </DIV>
                        <P>
                            <FONT color="#999999" face="Arial, Helvetica, sans-serif" size="1" style="font-size: 12px;">
                                <STRONG>验证码:</STRONG>
                            </FONT>
                        </P>
                        <TABLE border="0" cellspacing="0" cellpadding="0">
                            <TBODY>
                            <TR>
                                <TD width="145"><FONT color="#ffffff"
                                                      face="Arial, Helvetica, sans-serif"><STRONG>
                                            <INPUT name="login" type="hidden" value="yes">
                                            <INPUT name="txtValidCode" title="Please Input Valid Code!" class="inputText" onfocus="if(this.value==' Please Input Valid Code!')this.value='';" type="text" size="15" maxlength="20">
                                        </STRONG></FONT></TD>
                                <TD>
                                    <DIV style="width: 45px; text-align: center; padding-top: 2px; padding-bottom: 1px; vertical-align: middle; background-color: rgb(255, 255, 255);">
                                        <SCRIPT>getCode();</SCRIPT>
                                    </DIV>
                                </TD>
                            </TR>
                            </TBODY>
                        </TABLE>
                        <DIV class="form-line-btn" id="login_btn_line">
                            <DIV class="element">
    <SPAN class="btn-wrap btn-login-wrap">
    <BUTTON name="I1" tabindex="3" class="btn-blue" id="btn_login" onkeydown="keyEvent(event);" type="submit"></BUTTON>
    <SPAN class="btn-text">登&nbsp;录</SPAN>
    </SPAN>
                        <!--        <a target="_blank" href="./updatepassword.php">忘记密码</a>-->
                            </DIV>
                        </DIV>




                        <DIV class="form-line form-links">
                            <DIV class="element"><A href="http://3.mdkj99.com/#"
                                                    target="_blank">注册账号</A>&nbsp;&nbsp;|&nbsp;&nbsp;<A href="http://3.mdkj99.com/#"
                                                                                                        target="_blank">忘记密码</A>&nbsp;&nbsp;								</DIV></DIV></FIELDSET></FORM><!-- 一次登录 ]] -->

                <P class="advisory-phone gray"></P>
                <P class="advisory-phone gray"
                   style="color: red; font-size: 16px;"></P></DIV></DIV><!-- 登录框 ]] -->		 </DIV><!-- 首页大图 [[ -->

    <DIV class="page-bg">
        <div class="banner" id="b02">

            <ul>

                <li><img src="./unslider/13.png" alt="" width="1200" height="600" ></li>
<!--
                <li><img src="./unslider/11.png" alt="" width="1200" height="600" ></li>

                <li><img src="./unslider/13.png" alt="" width="1200" height="600" ></li>-->
<!--                <li><img src="./unslider/15.jpg" alt="" width="1200" height="678" ></li>-->


            </ul>

        </div>
    </DIV><!-- 首页大图 ]] -->
    <!-- 内容 ]] -->	 <!-- 页底 [[ -->
    <DIV class="page-bottom" style="display: none;"><FOOTER>
            <DIV class="index-footer gray gray-links"><A href="http://3.mdkj99.com/#"
                                                         target="_blank">关于万启</A>&nbsp;&nbsp;   <A href="http://3.mdkj99.com/#" target="_blank">联系我们</A>&nbsp;&nbsp;
                <A href="http://3.mdkj99.com/#" target="_blank">服务协议</A>&nbsp;&nbsp;
                <SPAN>Copyright©2005-2013 gouwu10010 All Rights
Reserved&nbsp;&nbsp;&nbsp;万启公司 版权所有</SPAN>			 </DIV>
            <DIV class="partner-auth-wrap">
                <DIV class="partner-auth">
                    <UL>
                        <LI><A title="支付业务许可证" class="ico-license" href="http://3.mdkj99.com/#"
                               target="_blank">支付业务许可证</A>						 </LI>
                        <LI><A title="万启率先通过国家信息安全认证" class="ico-safe-auth" href="http://3.mdkj99.com/#"
                               target="_blank">安全认证</A>						 </LI>
                        <LI><A title="Visa验证" class="ico-verified" href="http://3.mdkj99.com/#"
                               target="_blank">Verified</A>						 </LI>
                        <LI><A title="VeriSign加密服务" class="ico-verisign" href="http://3.mdkj99.com/#"
                               target="_blank">verisign</A>						 </LI>
                        <LI><A title="电子商务协会认证诚信网站" class="ico-integrity" href="http://3.mdkj99.com/#"
                               target="_blank">电子商务协会认证诚信网站</A>						 </LI></UL></DIV></DIV></FOOTER></DIV><!-- 页底 ]] -->
    <!-- ui-dialog -->
    <DIV title="系统维护公告" id="dialog" style="display: none;">
        <P style="font-size: 14px;">公司决定于2013年4月9日(明天)8:30-11:30
            对系统进行维护升级，给您带来不便，敬请谅解。</P></DIV></DIV></BODY></HTML>